package dao;

import entity.Resource;
import exception.DataAccessException;
import org.apache.ibatis.annotations.Param;
import vo.ResourceVo;

import java.util.List;

public interface ResourceDao {
    int insertResource(Resource resource) throws DataAccessException;

    List<Resource> selectResources(ResourceVo resource);

    Resource selectResourceByTitle(String title) throws DataAccessException;

    int updateResource(Resource resource) throws DataAccessException;

    int deleteResourceById(Integer id) throws DataAccessException;

    Resource selectById(int id);

    int selectClickCountById(int id);

    int updateClickCountById(@Param("id") int id, @Param("click_count") int click_count);
}
